/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2016-2018, LomboTech Co.Ltd.
 * Authors:
 *	lomboswer <lomboswer@lombotech.com>
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 */

#ifndef _LOMBO_WB_H_
#define _LOMBO_WB_H_

struct drm_framebuffer;
struct drm_lombo_wb_set_para;
struct drm_lombo_wb_dequeue_buf;
struct drm_lombo_wb_start_arg;
struct lombo_wb;

struct lombo_wb_que_buf {
	struct drm_framebuffer *fb;
	int release_fence;
	uint64_t user_priv;
};

struct lombo_wb_funcs {
	int (*set_para)(struct lombo_wb *wb,
			struct drm_lombo_wb_set_para *para);

	int (*queue_buf)(struct lombo_wb *wb,
			 struct lombo_wb_que_buf *que_buf);

	int (*dequeue_buf)(struct lombo_wb *wb,
			   struct drm_lombo_wb_dequeue_buf *deq_buf);

	int (*start)(struct lombo_wb *wb,
		     struct drm_lombo_wb_start_arg *arg);

	int (*stop)(struct lombo_wb *wb);
};

#endif /* #ifndef _LOMBO_WB_H_ */
